import {
  http
} from '@/api/service.js'
/**
 * 头部广告
 * @param {Object} data - 查询数据
 * @param {Object} params - 查询params参数
 */
export const databaseBanner = (data, params) => {
  return http.middleware({
    method: 'POST', // 必须大写
    url: '/database/banner',
    data: data,
    params: params,
    custom: {
      auth: true
    }
  })
}
/**
 * 报考类型
 * @param {Object} data - 查询数据
 * @param {Object} params - 查询params参数
 */
export const getTypeList = (data, params) => {
  return http.middleware({
    method: 'POST', // 必须大写
    url: '/database/getTypeList',
    data: data,
    params: params,
    custom: {
      auth: true
    }
  })
}

/**
 * 资料列表
 * @param {Object} data - 查询数据
 * @param {Object} params - 查询params参数
 */
export const getDatabaseList = (data, params) => {
  return http.middleware({
    method: 'POST', // 必须大写
    url: '/database/getDatabaseList',
    data: data,
    params: params,
    custom: {
      auth: true
    }
  })
}
/**
 * 收藏资料
 * @param {Object} data - 查询数据
 * @param {Object} params - 查询params参数
 */
export const collectionDatabase = (data, params) => {
  return http.middleware({
    method: 'POST', // 必须大写
    url: '/database/collectionDatabase',
    data: data,
    params: params,
    custom: {
      auth: true
    }
  })
}
/**
 * 合集列表
 * @param {Object} data - 查询数据
 * @param {Object} params - 查询params参数
 */
export const getDatabaseSetList = (data, params) => {
  return http.middleware({
    method: 'POST', // 必须大写
    url: '/database/getDatabaseSetList',
    data: data,
    params: params,
    custom: {
      auth: true
    }
  })
}
/**
 * 集合资料列表
 * @param {Object} data - 查询数据
 * @param {Object} params - 查询params参数
 */
export const getSetDatabaseList = (data, params) => {
  return http.middleware({
    method: 'POST', // 必须大写
    url: '/database/getSetDatabaseList',
    data: data,
    params: params,
    custom: {
      auth: true
    }
  })
}

/**
 * 投诉
 * @param {Object} data - 查询数据
 * @param {Object} params - 查询params参数
 */
export const complaint = (data, params) => {
  return http.middleware({
    method: 'POST', // 必须大写
    url: '/database/complaint',
    data: data,
    params: params,
    custom: {
      auth: true
    }
  })
}
/**
 * 资料 集合详情
 * @param {Object} data - 查询数据
 * @param {Object} params - 查询params参数
 */
export const databaseInfo = (data, params) => {
  return http.middleware({
    method: 'POST', // 必须大写
    url: '/database/info',
    data: data,
    params: params,
    custom: {
      auth: true
    }
  })
}
/**
 * 根据资料获取集合
 * @param {Object} data - 查询数据
 * @param {Object} params - 查询params参数
 */
export const databaseInfoSetList = (data, params) => {
  return http.middleware({
    method: 'POST', // 必须大写
    url: '/database/databaseInfoSetList',
    data: data,
    params: params,
    custom: {
      auth: true
    }
  })
}
/**
 * 热搜
 * @param {Object} data - 查询数据
 * @param {Object} params - 查询params参数
 */
export const hotSearch = (data, params) => {
  return http.middleware({
    method: 'POST', // 必须大写
    url: '/database/hotSearch',
    data: data,
    params: params,
    custom: {
      auth: true
    }
  })
}
/**
 * 搜索接口
 * @param {Object} data - 查询数据
 * @param {Object} params - 查询params参数
 */
export const databaseSearch = (data, params) => {
  return http.middleware({
    method: 'POST', // 必须大写
    url: '/database/search',
    data: data,
    params: params,
    custom: {
      auth: true
    }
  })
}
/**
 * 资料 集合详情
 * @param {Object} data - 查询数据
 * @param {Object} params - 查询params参数
 */
export const shareInfo = (data, params) => {
  return http.middleware({
    method: 'POST', // 必须大写
    url: '/share/info',
    data: data,
    params: params,
    custom: {
      auth: true
    }
  })
}
/**
 * 收藏合集
 * @param {Object} data - 查询数据
 * @param {Object} params - 查询params参数
 */
export const collectionDatabaseSet = (data, params) => {
  return http.middleware({
    method: 'POST', // 必须大写
    url: '/database/collectionDatabaseSet',
    data: data,
    params: params,
    custom: {
      auth: true
    }
  })
}
/**
 * 系统设置
 * @param {Object} data - 查询数据
 * @param {Object} params - 查询params参数
 */
export const system = (data, params) => {
  return http.middleware({
    method: 'POST', // 必须大写
    url: '/system/system',
    data: data,
    params: params,
    custom: {
      auth: true
    }
  })
}
/**
 * 激活码相关系统设置
 * @param {Object} data - 查询数据
 * @param {Object} params - 查询params参数
 */
export const activeSystem = (data, params) => {
  return http.middleware({
    method: 'POST', // 必须大写
    url: '/system/activeSystem',
    data: data,
    params: params,
    custom: {
      auth: true
    }
  })
}
/**
 * 浏览资料
 * @param {Object} data - 查询数据
 * @param {Object} params - 查询params参数
 */
export const readDatabase = (data, params) => {
  return http.middleware({
    method: 'POST', // 必须大写
    url: '/database/readDatabase',
    data: data,
    params: params,
    custom: {
      auth: true
    }
  })
}
/**
 * 浏览合集
 * @param {Object} data - 查询数据
 * @param {Object} params - 查询params参数
 */
export const readDatabaseSet = (data, params) => {
  return http.middleware({
    method: 'POST', // 必须大写
    url: '/database/readDatabaseSet',
    data: data,
    params: params,
    custom: {
      auth: true
    }
  })
}